//
//  AddressTableViewCell.m
//  YTwallet
//
//  Created by ZhangLin on 2019/3/27.
//  Copyright © 2019年 hadrlog. All rights reserved.
//

#import "AddressTableViewCell.h"
#import <Masonry.h>
@implementation AddressTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setupViews];
    }
    return self;
}
-(void)setupViews
{
    self.prefixLab = [[UILabel alloc] init];
    self.prefixLab.textColor = ETColorWithRGB(138, 146, 199);
    self.prefixLab.font = [UIFont systemFontOfSize:13];
    [self.contentView addSubview:self.prefixLab];
    
    self.cityLab = [[UILabel alloc] init];
    self.cityLab.textColor = ETColorWithRGB(51, 51, 51);
    self.cityLab.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:self.cityLab];
    
    self.imv = [[UIImageView alloc] init];
    [self.contentView addSubview:self.imv];
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    [self.prefixLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(21);
        make.centerY.equalTo(self);
        make.width.mas_equalTo(20);
    }];
    
    [self.cityLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.prefixLab.mas_right).offset(8);
        make.centerY.equalTo(self);
    }];
    
    [self.imv mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-15);
        make.centerY.equalTo(self);
        make.width.mas_equalTo(20);
        make.height.mas_equalTo(20);
    }];
    
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
